Configuring Internal Azure Mail Server on Microsoft Office 365

This procedure describes how to forward alarms by email through the configuration of a user account on the Microsoft Office 365 platform. Office365 configuration on exim.conf is not supported by AudioCodes security policy.

The Office 365 user name is not necessarily the email address.

Do the following:
1. Subscribe to sendgrid appfrom the Azure marketplace.
2. When subscription is confirmed and permissions granted, verify the email destination for forwarding alarms.
3. Create an API key.
4. Login into the OVOC server by SSH, as ‘acems’ user and enter password acems.
5. Switch to 'root' user and provide root password (default password is root):
su - root
6. Backup the exim configuration file:
cp /etc/exim/exim.conf /etc/exim/exim.conf.bak
7. Edit the exim configuration file:
vim /etc/exim/exim.conf
8. After the line "begin transports", add the following configuration:
Copy
 begin transports
    sendgrid_smtp:
    driver = smtp
    hosts = smtp.sendgrid.net
    hosts_require_auth = <; $host_address
    hosts_require_tls = <; $host_address 
9. After the line "begin routers", add the following configuration:
Copy
begin routers
    send_via_sendgrid:
    driver = manualroute
    domains = ! +local_domains
    transport = sendgrid_smtp
    route_list = "* smtp.sendgrid.net::587 byname"
    host_find_failed = defer
    no_more 
10. After the line "begin authenticators", add the following configuration, replacing Username and Password with your SendGrid User/Pass:
Copy
begin authenticators
    sendgrid_login:
    driver = plaintext
    public_name = LOGIN
    client_send = : Username : Password 
The User name is always apikey.
The password is the key you generated in Step 3.
11. Open /root/.muttrc
12. Replace the default email address set from = OVOC@AudioCodes.com with the proper email address of the owner of the OFFICE365_USERNAME account.
13. Restart the Exim service:
systemctl restart exim
14. Type the following command to test the mail setup via OVOC:
echo "server 243" | mutt -s "OVOC received 10 new alarms" -F /root/.muttrc <yourEmailAddress> 

AudioCodes may block emails from sendGrid, use other email addresses other than xx@AudioCodes.com for testing sendGrid.